Skip to content

fix(platform): discover Nix agent CLIs - #6125

Draft
Pape45 wants to merge 1 commit into
nexu-io:mainfrom
Pape45:agent/detect-nix-agent-clis
Draft

fix(platform): discover Nix agent CLIs#6125
Pape45 wants to merge 1 commit into
nexu-io:mainfrom
Pape45:agent/detect-nix-agent-clis

Conversation

@Pape45

@Pape45 Pape45 commented Jul 27, 2026

Copy link
Copy Markdown

Fixes #6121

Why

I hit this while launching Open Design 0.16.1 from Finder on macOS with Codex installed through Nix. The CLI resolves normally in an interactive terminal, but the packaged app inherits a stripped launchd PATH and therefore reports the agent as unavailable.

The shared toolchain resolver already compensates for Homebrew and common language/version-manager locations. Adding the standard user and system Nix profile bins closes the same GUI-PATH gap for both daemon executable resolution and the packaged sidecar PATH builder.

What users will see

Agent CLIs installed in ~/.nix-profile/bin or /run/current-system/sw/bin are discovered automatically by GUI-launched Open Design sessions. Existing search order and non-Nix installs are unchanged.

Surface area

  • UI — new page / dialog / panel / menu item / setting / empty state in apps/web or apps/desktop (including Electron menu bar)
  • Keyboard shortcut — new or changed
  • CLI / env var — new od subcommand or flag, new tools-dev / tools-pack flag, or new OD_* env var
  • API / contract — new /api/* endpoint, new SSE event, or changed shape in packages/contracts
  • Extension point — new entry under skills/, design-systems/, design-templates/, or craft/, or change to the skills protocol
  • i18n keys — added new translation keys (see TRANSLATIONS.md for the locale workflow)
  • New top-level dependency — adding any new entry to the root package.json (dependencies or devDependencies); workspace-package package.json files are out of scope. Include a paragraph on what we get vs. what bytes we ship (see CONTRIBUTING.md → Code style)
  • Default behavior change — changes what existing users experience without opting in (default model, default setting, file/SQLite schema, auto-network on startup, auto-install)
  • None — internal refactor, docs, tests, or translation update only

Screenshots

Not applicable; this changes executable discovery without adding or changing UI.

Bug fix verification

Validation

  • pnpm --filter @open-design/platform test -- index.test.ts — 80 passed
  • pnpm --filter @open-design/platform typecheck
  • pnpm guard
  • pnpm typecheck

Adjacent issues

#6122 is intentionally separate because exposing an unavailable Codex binary override is an independent Settings UI concern.

@lefarcen
lefarcen requested a review from mrcfps July 27, 2026 14:51
@lefarcen lefarcen added size/XS PR changes <20 lines risk/medium Medium risk: regular code changes type/bugfix Bug fix labels Jul 27, 2026
@lefarcen

Copy link
Copy Markdown
Contributor

Thanks @Pape45 — the shared toolchain.ts fix plus the regression coverage in packages/platform/tests/index.test.ts is a clean way to address the Finder/launchd PATH gap.

I can see this is opened as a draft, so I'll hold off on a full review until you mark it ready.

@Pape45
Pape45 marked this pull request as ready for review July 27, 2026 15:09
@Pape45
Pape45 requested a review from a team as a code owner July 27, 2026 15:09

@mrcfps mrcfps left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Pape45

I verified that the shared toolchain resolver now includes both the standard per-user and system Nix profile bin directories, so the packaged PATH builder and daemon executable discovery receive the fix together without changing the existing precedence. The added regression assertions cover inclusion and system-bin opt-out behavior. I also ran all 80 platform tests, the platform typecheck, the repository guard, and the full workspace typecheck successfully. Thank you for the focused fix and clear verification—nice work! 🙌

🔁 Powered by Looper · runner=reviewer · agent=codex · An autonomous AI dev team for your GitHub repos.

@lefarcen lefarcen added the needs-validation Runtime change detected; needs human or /explore agent validation. label Jul 27, 2026
@lefarcen

Copy link
Copy Markdown
Contributor

🧪 Queued for QA validation — this PR has changes that need a manual QA pass before it's merged. Nothing needed from you; we'll update here once it's validated. Thanks for the contribution! 🙏

Pape45 commented Aug 2, 2026

Copy link
Copy Markdown
Author

Hi — I’m still actively maintaining this PR. It was marked ready on July 27, approved by @mrcfps, and then explicitly queued for manual QA with “Nothing needed from you.” I therefore waited for QA rather than posting activity-only comments.

It was converted back to draft on July 30 for inactivity, and #6334 now proposes the same Nix paths. Could a maintainer please clarify whether #6125 should be restored to ready or considered superseded by #6334? I’m happy to follow whichever route you prefer.

@lefarcen

lefarcen commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Heads-up: PR #6334 is also open against the same fix path — both PRs change packages/platform/src/toolchain.ts and packages/platform/tests/index.test.ts to add the Nix profile discovery paths for #6121.

Sharing this so the maintainer team can choose one canonical PR and neither thread ends up doing duplicate work.

@lefarcen

lefarcen commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Thanks for the clear summary, @Pape45 — given the QA note on July 27, waiting here instead of posting activity-only comments was reasonable.

PR #6334 is now open against the same fix path, so I’ve surfaced your question to the maintainer team as a restore-vs-supersede decision instead of asking you to churn on this branch in the meantime. Once they pick the canonical PR, we’ll follow that route here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-validation Runtime change detected; needs human or /explore agent validation. risk/medium Medium risk: regular code changes size/XS PR changes <20 lines type/bugfix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Desktop app does not discover agent CLIs installed through Nix

3 participants